﻿using System;
using System.Collections.Generic;

namespace Bilibili.Model.Wallet
{
    public sealed class PayQuanModel
    {
        public int Code { get; set; }
        public string Message { get; set; }
        public PayQuanModel Data { get; set; }
        public List<PayQuanModel> List { get; set; }
        public string Mid { get; set; }
        public string Activity_Name { get; set; }
        public int Coupon_Status { get; set; }
        public string Status
        {
            get
            {
                switch (Coupon_Status)
                {
                    case 1:
                        return "使用中";
                    case 2:
                        return "已使用";
                    default:
                        return "未使用";
                }
            }
        }
        public string Coupon_Money { get; set; }
        public string Ctime { get; set; }
        public string Coupon_Original { get; set; }
        public string Coupon_Token { get; set; }
        public string CtimeStr
        {
            get
            {
                DateTime dtStart = new DateTime(1970, 1, 1);
                long lTime = long.Parse(Ctime + "0000");
                TimeSpan toNow = new TimeSpan(lTime);
                DateTime dt = dtStart.Add(toNow);
                return dt.ToString();
            }
        }
    }
}